package exam.niuke;

import java.util.Scanner;

/**
 * 字符串分隔
 * <p>
 * •输入一个字符串，请按长度为8拆分每个输入字符串并进行输出；
 * •长度不是8整数倍的字符串请在后面补数字0，空字符串不处理。
 */
public class ExamHJ4 {
    public static void main(String[] args) {
        test01();
    }


    public static void test01() {
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
        int length = str.length();
        if (length == 0) {
            return;
        }
        int circle = length / 8;
        for (int i = 0; i < circle + 1; i++) {
            String substring;
            try {
                substring = str.substring(8 * i, 8 * i + 8);
            } catch (Exception e) {
                substring = str.substring(8 * i);
            }
            printSubstring(substring);
        }
    }

    private static void printSubstring(String substring) {
        int length = substring.length();
        if (length == 0) {
            return;
        }
        if (length == 8) {
            System.out.println(substring);
        }
        if (length < 8) {
            StringBuilder stringBuilder = new StringBuilder(substring);
            int fillNum = 8 - length;
            for (int i = 0; i < fillNum; i++) {
                stringBuilder.append("0");
            }
            System.out.println(stringBuilder.toString());
        }
    }

}
